# 导入requests库
import requests
# import exportext


INS_ref_1 = requests.get('https://api.github.com/events')
INS_ref_2 = requests.post('http://httpbin.org/post', data = {'key':'value'})
INS_ref_3 = requests.put('http://httpbin.org/put', data = {'key':'value'})
INS_ref_4 = requests.delete('http://httpbin.org/delete')
INS_ref_5 = requests.head('http://httpbin.org/get')
INS_ref_6 = requests.options('http://httpbin.org/get')


print(INS_ref_1.text)
print("编码类型" + str(INS_ref_1.encoding))
# 抛出异常
print(INS_ref_1.status_code)
INS_ref_1.status_code == requests.codes.ok
INS_ref_1.raise_for_status()